package entity;

/**
 * describe 数据库配置
 * author wencong 2022/3/3
 */
public class DatebaseEntity {

    // 获取数据库对象
    public static DatebaseEntity getDatebase(String projectName){
        return switch (projectName) {
//            case "duroAdminAsp" -> new DatebaseEntity("101.35.90.41", "50010", "erpasp", "wencong", "wencong863");
            case "duroAdminAsp" -> new DatebaseEntity("sh-cdb-9td0bwbs.sql.tencentcdb.com", "59372", "hm", "wenb", "my0512@151");
            case "hmErpCloudAsp" -> new DatebaseEntity("101.35.90.41", "50001", "hmerpcloudasp", "wencong", "wencong863");
            default -> new DatebaseEntity();
        };
    }

    private String ip;
    private String prot;
    private String database;
    private String username;
    private String password;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getProt() {
        return prot;
    }

    public void setProt(String prot) {
        this.prot = prot;
    }

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public DatebaseEntity() {
    }

    public DatebaseEntity(String ip, String prot, String database, String username, String password) {
        this.ip = ip;
        this.prot = prot;
        this.database = database;
        this.username = username;
        this.password = password;
    }
}
